implemented CachingState, moved some stuff to Infrastructure dll, added JetBrains.Annotations