Converted engine to tstring and did some small bug fixes related to that.