code cleanup suggestions

I took a pass through your code and added comments where I thought cleanup might be necessary.