A refactoring excercise