intermediate
replaced entity lookup with template version. performance slower?
fixed performance issue - reference instead of copy
further changes to make entity repository templated. performance now ~0.4% slower