Added grunt configuration

Signed-off-by: Jesús Merino Parra <jmmerino@gmail.com>
Modified source code and minified one

Signed-off-by: Jesús Merino Parra <jmmerino@gmail.com>
Added tests for the new method "consolidate"

Signed-off-by: Jesús Merino Parra <jmmerino@gmail.com>