Cut down a lot of duplicate code in tile_render functions