Minor changes + PHPUnit tests