Minor changes to model, started writing unit tests