small cleanups and fixes