added gitignore, added jsdoc header and fixed code on which jslint complained