Add course instance model

Needs more complete tests before being finished