Added comments to the javascript code, removed redundant logs and updated license