More refactoring
Ans some more refactoring