Updated JavaScript code in regard to documentation

Updated code documentation for being able to automatically generate a proper documentation using JSDuck.