Reorganization to separate the code from the tests