Various fixes

1. Switching to Dictionary over ConcurrentDictionary where it was applicable
2. Introduced SharedResources as a preparation for a VisualTree optimization