updated styling and refactoring