cleaned up and finished some of the main WebAPI class