Added main function.