first round of code cleanup+comments