Code cleanup from code reviews.

Remove some unused code and fix spacing and indentation.