Minor clean up for the rendering view, to remove duplicated code.