Fixed the bugs I made with unit testing in the last few commits.