Moved custom code to custom folder. Changed Filter to FilterDefinition. Added RestApiControllerBase and moved related functionality to it. Created corresponding ApiController for each relevant data type. Figured out how to do an async process.