cleaned up submenus code to match style of original authors, updated minified as well