Major clean up + merged stuff from fredrich420
Merge remote-tracking branch 'origin/cm-11.0' into cm-11.0