cleanup and improvements.