Cleanups and improvements.