Refactoring and cosmetic changes