Fix errors in js loading. Removed unused code