Apply refactor changes