Updated problem with batch tagging, code cleanup (spacing)