Ran JS Fiddle and corrected some errors. Fixed typo.