Mechanistically analyzing the effects of fine-tuning on procedurally defined tasks