Cleanup

Some code clean-up. May wish to review commit by commit as some are simply style issues.