Change the javascript code to coffeescript
Fix a bug
Fix a conflict