Improved submenu template and templatetags