Added main to factorial