Private key improvements

Addresses #141