Added XML annotations to types and restructured the request handling.