Script loader update

Also make the client script error less in JSLint.