refactor index.js file to files in node folder, add 3 new analytics functions and tweak 3 old ones, update readme