Yeah, it can be solved with generics, but even that requires a bunch of really nasty casting. I'll think about it some more after I merge this, and if there's nothing better just go with the generics solution.