Render refactor (with couple of fixes)

This probably isn't needed?