Simplified parse_request.
Added basic request types for processing queries.