Some work on generic and function class refs, not compilable.