Some changes for the accelerometer code and adding the gyroscope UI