Modified frequency calculation and implemented alternative inverse squareroot function.
Removed unused code.
Implemented swapping of sensor axis and removed unused code.