Better commenting, fixed scope, code looks good. I declare this v1.0