Move formatKey to Cache where it's used
Some missed imports