Minor cleanups in utilities