Fixed jshints warnings and removed unused stuff.