New client, refactored most of the code into objects