Added coffeescript syntax and added bindings for window switching