Added ReferenceModel and genmodel