Reworked a lot of the rendering system