Moving model code into _DetailBase.