revert to maps instead of case-class, was not getting much of a
performance boost and would break AOT