Removed extraneous comma

IE7 doesn't deal well with extra commas at the end of javascript object
initializers.
Declare "pos" as local variable

This variable is set in the `for` loop on the next line. We should
declare it locally to avoid setting a global variable.
Removed unused variable
Merge pull request #118 from j2jensen/master

A few minor fixes