More refactoring and more style issues