formating, and a little cleanup