First version of client, need refactorisation and finish tests