Insert Bug Fix

- Fixed a few JSLint errors
- Fixed a problem where the collection returned by createCollection would be null (when doing an insert).  In my case, the mongo error was "collection already exists". The problem was that the insert method was called on this null object.