WIP rendering refactoring