Refactoring a lot of the code
Modo test working