Random fixes and improvements.