Refined rendering code