Minor code cleanup (DRY)

Minor code cleanup (DRY)