Fix JavaScript lint errors, missing semicolons and parseInt second argument