Styling and code refactoring