Minor cleanup to make code less indirect