WIP - Added functions in ref controller and model."