Finishing refactoring