refactored the creation of menu icons, located in glyph.js
merged with master