It's not gonna be great, it's not gonna be beautiful, but somehow this should work. Return a hashmap of lists for each object type or something.