Code refactoring following the review with Luke
Broken tests after refactoring