Simplify rendering code