Completed unit tests. Still needs more integration testing.