Minor cleanups in the code