PHPUnit tests for another two Core classes, and bug fixes within those.