Numbering within model

Take numbering of periods out of controller and put into model (see issue #208).