code-cleanup
fix up and working.
Only uses accelerometer now as sensor.