Documented the main function.