Move source into source directory.
Modernised code for iOS 6/7, added support for magnetic vector.