         }
     ]
 
-templateOsx = (viewstate) -> [
-    {
-        label: 'YakYak'
-        submenu: templateYakYak viewstate
-    }, {
-        label: 'Edit'
-        submenu: templateEdit viewstate
-    },{
-        label: 'View'
-        submenu: templateView viewstate
-    }, {
-        label: 'Window'
-        submenu: templateWindow viewstate
-    }
-  ]
-
-templateOthers = (viewstate) -> [
-    {
-        label: 'YakYak'
-        submenu: templateYakYak viewstate
-    }, {
-        label: 'Edit'
-        submenu: templateEdit viewstate
-    },{
-        label: 'View'
-        submenu: templateView viewstate
-    }
-  ]
+templateMenu = (viewstate) ->
+    tmpl = [{
+            label: 'YakYak'
+            submenu: templateYakYak viewstate
+        }, {
+            label: 'Edit'
+            submenu: templateEdit viewstate
+        },{
+            label: 'View'
+            submenu: templateView viewstate
+        }
+    ]
+    if os.platform() == 'darwin'
+        tmpl.push {
+            label: 'Window'
+            submenu: templateWindow viewstate
+        }
+    tmpl
 
 module.exports = (viewstate) ->
-    if os.platform() == 'darwin'
-        Menu.setApplicationMenu Menu.buildFromTemplate templateOsx(viewstate)
-    else
-        Menu.setApplicationMenu Menu.buildFromTemplate templateOthers(viewstate)
+    Menu.setApplicationMenu Menu.buildFromTemplate templateMenu(viewstate)

        }
    ]
    if os.platform() == 'darwin'
        tmp = tmp.concat {
            label: 'Hide Dock icon'
            type: 'checkbox'
            enabled: viewstate.showtray
            checked:  viewstate.hidedockicon
            click: -> action 'togglehidedockicon'
        }
    tmp

templateWindow = (viewstate, os) ->
    tmp = [
        {
            label: 'Minimize'
            accelerator: acceleratorMap['minimize'][os]

  ]

templateEdit = (viewstate) ->
    tmpl = [
        { label: 'Undo', accelerator: acceleratorMap['undo'][os], selector: 'undo:' }
        { label: 'Redo', accelerator: acceleratorMap['redo'][os], selector: 'redo:' }
    ]
    if os.platform() == 'darwin'
        tmpl.push [
          { type: 'separator' }
          { label: 'Cut', accelerator: acceleratorMap['cut'][os], selector: 'cut:' }
          { label: 'Copy', accelerator: acceleratorMap['copy'][os], selector: 'copy:' }
          { label: 'Paste', accelerator: acceleratorMap['paste'][os], selector: 'paste:' }
          { label: 'Select All', accelerator: acceleratorMap['selectall'][os], selector: 'selectAll:' }
        ]
    tmpl

templateView = (viewstate) ->
    tmpl = [
        {
            label: 'Conversation List'
            submenu: [
