Added more functions & phpdoc comments