Final bug fixes and improvements.