Added preferences window and linked to keychain