experimenting with the keystore and some general cleanup.