Various bugfixes and engine logic fixes.
Merge origin/master