Formatting + better key check + length caching in content/lock.js.