Core/Scripts: multiple changes
- fixed non pch build
- fixed some warnings
- fixed some coverity issues
- some random things here and there