converted all JS code to coffeescript, added gitignore of phantomjs log, refactor