Changed function definitions from var myFunction = function () {}; to function myFunction() {};
Added documentation.