Turned Dict from object into instance tied to TR.

Added tests.