Moved core data stack to model class