Remade in coffeescript and adds options