Fixe a compilation issue. And refactored tests.