ie instead of doing all this, just instantiating a HashMap<Class, Monoid<?>> that does this, with a setter that casts the output. This is in line with our general conversation around having safer links. That' sjust one of many options.