JS part was rewrited in Coffeescript