started refactoring request code to clean up and compact (new code still highly coupled to client implementation)