Added documentation, fixed bug with magnetometer