minor cleanings and micro optimizations