Made some headway on the PHPUnit tests