Minor cleanup/optimizations