Added coffeescript to close a window