Add support for main function.