code chore, minor optimizations