Add model methods and unit tests.

Some unit tests are broken.
Some unit tests are missing tests.
Some unit tests are not written at all.
Update readme.