More work on the pinentry. Clean up CLI, use Console_CommandLine. Clean up logging and error handling. Clean up whitespace.