Synchronize access to nextUid to prevent concurrency issues
Swap .erasure to .runtimeClass (erasure was deprecated)
Make futures hashmap thread safe
Start using [String, Ref] instead of [String, Tuple3] again - previous issue seems to be gone.
Update tests - fix issues due to concurrency