Final, final cleanup  and bug fixes.

Change-Id: I6eed253c1fd8bd060e6502c2d0e1c2146d5bed87
Merge "Final, final cleanup  and bug fixes."