Added author info to package.json
separated script from functions; made code more readable