Adding keychainInconsistencyExists and sanitizeKeychain, with comments of what they are.