Converted all from CoffeeScript to Javascript