Refactor the client to be much more short written