Refactoring; added classes ModelInstanceObserver and ModelInstancePatched