Refactoring and more