Cleanup of code

Couple of changes. Look at the diffs to see what I changed. Comments go a long way too!