Clean up Keychain code