Clean up a few bits here and there
Initial magnetometer readout code
Some minor additions to this code