merged tag.c, view.c and tile.c to manage.c