Lil bit of decomposition
Some more refactoring