Improved documentation of the main javascript file