Added some ES6 polyfills to String.
Improved documents.close function.
Added shortcuts to charIDToTypeId and stringIDToTypeId