Added functionality to mark active menu elements.