   packet.poi_comment = comment
 
 savePacket = (packet) ->
-  setTimeout (->
-    try
-      return unless packet? and packet.poi_timestamp?
-      filename = packet.poi_timestamp
-      file = path.join(APPDATA, "#{filename}.json")
-      data = JSON.stringify(packet)
-      fs.writeFileSync(file, data, FS_RW_OPTIONS)
-    catch error
-      console.error error
-  ), 0
+  setTimeout ->
+    return unless packet? and packet.poi_timestamp?
+    filename = packet.poi_timestamp
+    file = path.join(APPDATA, "#{filename}.json")
+    data = JSON.stringify(packet)
+    fs.writeFileSync(file, data, FS_RW_OPTIONS)
 
 # filename = "#{packet.poi_timestamp}.json"
 loadPacket = (filename, callback) ->
-  setTimeout (->
-    try
-      return unless filename? and callback?
-      file = path.join(APPDATA, filename)
-      data = fs.readFileSync(file, FS_RW_OPTIONS)
-      packet = JSON.parse(data)
-      callback(packet)
-    catch error
-      console.error error
-  ), 0
+  setTimeout ->
+    return unless filename? and callback?
+    file = path.join(APPDATA, filename)
+    data = fs.readFileSync(file, FS_RW_OPTIONS)
+    packet = JSON.parse(data)
+    callback(packet)
+
+loadPacketSync = (path) ->
+  try
+    return unless path?
+    data = fs.readFileSync(path, FS_RW_OPTIONS)
+    packet = JSON.parse(data)
+  catch error
+    console.error error
 
 
 MainArea = React.createClass
-  componentDidMount: ->
-    window.addEventListener 'game.response', @handleResponse
-  componentWillUnmount: ->
-    window.removeEventListener 'game.response', @handleResponse
-
   getInitialState: ->
     # Game states
     isCombined: false

    battlePacketsNonce: 0
    battleNonce: 0
    battlePacket: null

  handleResponse: (e) ->
    `var path;`   # HACK: Force shadowing an variable `path`;

fs = require 'fs'
glob = require 'glob'
path = require 'path-extra'

{React, ReactDOM, ReactBootstrap} = window
ModalArea = require './modal-area'
