Tiny bit more perforamnt code that (mostly) passes JSHint.