Trivial cleanup of some lazy JavaScript