Adds labeling feature and tests