Added a model manager and unit tests