Javascript fixes - IE has reserved works like class

Fixed a few issues with JS. IE was having trouble with { class: