Beefed up unit tests as well as rearranging testing order such that it corresponds better to the order of the functions in class itself.