CoffeeScript rewrite

@pierreinglebert and I made this code super awesome !