move a class to an external file
fix test
Super refactoring.

Test are still not working.