General cleanup and improvements.