implementation of stage 2 of the Kata

Plus some refactoring