Misc engine improvements.