Improve rendering of menu; clarify domAdd function