Changed navigation menu, root level links are possible, and manual editing of template not needed.
Changed tree to items.
Small style correction.
Cleaned unneeded code.
Small performance fix.
Put getMaxPriority in a separate function.
Fixed a small bug in getMaxPriority function.
Merge remote-tracking branch 'ozan/menu'