Updated the REST query building methods to encode the query components. These will be ready to go when the new REST server is deployed.