Remove obsolete relation and labeling code