WIP - abstract out datatypes and renderer

Think the interface is pretty much there now. Only half-implemented
though