Refactor response data serialization and add separate base class for active record controllers