Simplify a little JS.