Refactored rendering engine