Refactoring and partial draft of the test suite