a few cleanups in the code.