Fixes previous errors.
Fixes jslint warnings.