Separate "storeKey" and "encodeNew", which they were a single function originally.