Moved to an instance dictionary rather than all statics for better testing.