assorted cleanup/fixes