Add some test and factorisation...