Fixed most of the unit tests to match the new code in v1.2.0.