Misc bug fixes.
Lint fixes.
Cleanup.