Use the new private/public key interface. Fix serialisation. First cut of wallet.