Misc engine additions and fixes