Some cleanup, and adding texture support

I hope to add a modern material facility here and actually makes this
optimize the use of triangles instead of simply bog down things.