accelerometer cleaned and some little fixes