Home GnuPG

Minor refactoring to reduce code duplication