Cleaned the code of the client