removed unused commented out code and moved tests inside doTests()