Adds node.js support, build process with Grunt and code refactoring