clean up of webservices code