Refactored rendering