minor cleanups and minor coding style