Add the main function.