Style cleanup

Cleaning up some of the code following @kfuruya review.