Removed 'insecure' RegExp.
Added JS Documentation.