clean up init, also fixes orientation/mag sesnors

Change-Id: I90ddd3a12d16a45d93d2b8d0020c686b6322a32d
Merge "clean up init, also fixes orientation/mag sesnors" into cm-10.1