comment changes
formatting and small optimizations