#3 Refactoring

I think I'm close to a solution