Fixed a bug in the next() method
Revert "Fixed a bug in the next() method"

This reverts commit 4c65e3e949f90f09f86f6b4c8792bb822c28122d.
Fixed a bug, added tests and Hinting

Fixed a bug in the next() method, added tests with QUnit and Hinting.
Added Grunt file to automate everything