     else if action.type is 'create'
       # Prevent attempt to write circular structure
       itemCopy = JSON.parse(JSON.stringify(action.item))
-      pagehandler.get(req.params[0], (e, page, status) ->
+      pagehandler.get req.params[0], (e, page, status) ->
         if e then return actionCB(e)
         unless status is 404
           res.send('Page already exists.', 409)
         else
           actionCB(null, itemCopy)
-      )
+
     else if action.type == 'fork'
       if action.item # push
         itemCopy = JSON.parse(JSON.stringify(action.item))

          cb())
      else
        cb()
    )

  #### Middleware ####
  #

      async.map files, doSitemap, (e, sitemap) ->
        if e then return res.e e
        res.json(sitemap.filter (item) -> if item? then true)


  ##### Put routes #####

  app.put /^\/page\/([a-z0-9-]+)\/action$/i, authenticated, (req, res) ->
    action = JSON.parse(req.body.action)
    # Handle all of the possible actions to be taken on a page,
    actionCB = (e, page, status) ->
