Moved tile rendering to template.