refactor do_request function
removal of obsolete files