Minor cleanup to new torch code