Labyrinth code for refactoring