More refactoring

And im not done there :P