Addressed comments and improved keypair cleanup strategy