Scripting

- Upgraded version of Sqrat to latest Git version.
- Fixed compilation/scripting errors. Overall the code is a bit better but probably needs a little more clean up.