refactored functions_js.html to self invoking functions with no var in the function