Reformulating the TBA equations for the quark anti-quark potential and their two loop expansion