refactored code, added .gitignore, package.json and README