Move model creation into helper method.
Enable ./setup.py test to work.