If you have questions about your code, post it in line, using code tags. Explain what you want it to do and what it does instead.
for the time being i would like to keep this project as simple as possible.
If you figure out a simple way to reliably classify accelerometer data into the categories you mention, many people would be interested.
This topic comes up frequently, and so far, no one seems to think that the problem is simple.