Fixed regex
Relative to absolute url in README

Added a comment to explain what the regex does

Fit to 80 line, fixed the replace regex

Added JSDOC comments

Added close comment, changed naming

Fixed jsdoc and styling

Fixed JSDoc, added extra comment

Removed useless debugging statement