Katas refactoring