The great refactoring

Done, finally :smirk: