Remove unused JS code + convert the remaining tests to jasmine