Code clean-up. More idiomatic JS.