small cleanups in the code