Ha, I just did the same refactor :) I also made getKeyFromDomain so we don't have to call getHash(getEtld) all the time