Lots of styling and refactoring