Misc: added phpdoc comments + other minor changes