some more cleaning, formatting, comments