Add main function.