Refactoring and more styling