Refactor and finish primitive models.