Refactor

Separate methods for loading and creating keys.