Refactor with coffeescript and add WIP for sub-menus