Some work on unit test generation

The Swift models need more work so they compile and the unit tests can be run.