Minor cleanups in main