The RenderUI function