Revert "Temporary cleanup inverted stuffs"

This reverts commit fb56628afc110c02ae05ea4d8658338e20e977c2.
Revert "Comment out inversion for now"

This reverts commit 1cdeb3e67c65e33cb1e3e0f2dc64e0a8cd735350.
Fix build errors

Change-Id: I63d56ad89115e6137aaf9776d63660c6d8ac4ddb