Improve documentation

Include documentation on the trim() polyfill and extend documentation on other functions.