Optimized the code rendering a bit.