Move ReadPrivateKey to a separate file.
Add some missing header guards.