Removed the CoffeeScript jsfiddle commented code that I used as a reference