Just some cleanup and minor refactoring/code style changes