More phpdoc comments; check for valid UTF-8.