Builds, Configures Gruntfile and Simplifies the main JS.

This commit configures Gruntfile to build the minified version with the version and also date.
The lib now support also sessionStorage without breaking previous code.
Some simplifications on the code are made.