Some clean up and added a VertexFactory-ish thing. Should be useful.