Minor optimization/clarity rewrites