Add model tests

Ready to merge.