Bring inline with CM10.1

* General clean-up
* Forked some changes from albinoman
* Build fixes for AOKP jb-mr1