Look in the wiki here - there’s a full reset procedure, a bit more involved that’s just disconnecting the battery. Did you check for any vacuum leaks anywhere? Even a small leak can affect idle - you can get a vac gauge to put inline with a t-piece to test. Could also be a faulty MAF reading - do you have access to VCDS and a test lead to check out all the signals?