Refactor rendering system.