Major cleanup

Change-Id: Icea57bedf54973d8a8d014d06191ca46fc2ac6be