i forgot what i did here
Move all rendering code into core, for map editor