major cleanup and simplification of client object