Cleaned spaces to tabs.
Added smoothing for devices without gyroscope.