Cleaned up all the unneeded output statements and added assertions to the unit tests.