Cleaned up javascript syntax issues with jshint
Changed tabs to spaces