2000 big bear 400 running issues

Hey guys I’m looking for some assistance here. My grandfather passed away recently and has left me a 2000 yamaha big bear 400 4×4. It has not run in at least 3 years. The battery is completely shot and I was not able to pull start it. I removed the fuel line from the carburetor and it was plugged solid with a build a green gum/varnish type material. After screwing with it for a while I finally got the carburetor removed and I took it apart and cleaned it. I also completely drained the fuel tank and replaced it with new fuel. After trying it for a while it did finally start after I boosted it with my truck. The problem is it is running so badly it won’t stay running at an idle. If I hold the throttle open about 1/8-1/4 inch it runs great. If I try to go anymore it coughs,sputters and backfires terribly. On the same account if I try and let it idle it seems to idle so low it just dies. it will rev up with the choke closed but as I said it just backfires. I know that is caused by a lack of air to mix with the extra fuel. What I don’t understand is why when I open the choke it wont rev up at all. It just dies if I try to give it any throttle. I remember riding this when I was younger and It was a great machine. It always started right up and idled perfectly. Obviously sitting for so long has taken its toll. I am wondering if the battery being so bad it is some how causing so sort of issue with trying to run it due to an electrical issue. Any ideas what I should try? I would prefer not to take it to have it checked out if I can but I guess as a last resort that is an option. Any help would be great. Thank you.