Ported initial model & test from hg