Added menu-functions and PHPDoc
Merge template-system-updates.