Moved all model-specific code to Api\Model