Some code cleanup in data_marking.py