Code refactoring; styling