fixed unit tests, continued migration from Java to Scala in the models