lots of styling and refactorings