Minor refactoring and initial style guide.