Merge pull request #3 from epmatsw/master

Fixed typos in comments
Use javascript trim() when available

Instead of always using a regex replace, it will use the native trim
function when available. This results in increased performance on every
system with trim() implemented (Firefox 3, Opera 11, Safari 5.x, Chrome
10, Internet Explorer 9 in standards mode).

Benchmarks: http://jsperf.com/wds1/10