cleanup and optimise dropdown menu
move all dropdown menu rendering to theme