Rework the test suite and first modifications of the implementation