optimized a bit and started commenting.