Final refactoring!