Updated tests and phpdoc