Move GPG initalization inside functions