Adding more Model tests and fixing bugs.