Major cleanup

Change-Id: Ic5cc141d089786666b17773190a92e497b8efdb5