linted javascript to remove a lot of errors