Added maxLevels rendering option to limit the rendered menu depth