re-worked the accelerometer detection for better battery savings. Needs lots of testing.