Enclose all code inside a module, so we don't add stuff to the global scope

Without this patch, we're adding a few auxiliary functions (i.e. ```isDate()```) to the global scope, which is bad.

I preferred not to indent all the code because I felt it was unnecessary (and this is the pattern used by jQuery as well, check https://github.com/jquery/jquery/blob/master/src/ajax.js).

The calendar looks neat, btw. Good job!