Upstream with cm

Change-Id: I6e4127ca35c9c232161d0e6925fcc4da7b762831
Compiling fixes

Change-Id: I512fb1f1a237f98ddf4cf63281fdb5bb081ab8d1
Oh also fixed TiBu btw... Moar compiling fixes

Change-Id: I0ffa493601a52b7ebdb457533334f375b52e217a