Fixed more ContiansKey + lookups to use TryGetValue