lots of little cleanup stuff