minor cleanups and fixes