Added more unit tests.
Removing old unit tests.  These functions will be tested using integration tests.
Added some more documentation.