More phpdoc fixes (including to buildtools templates); clean up whitespace