You didn't need to change your TB, just the Throttle position sensor for the code 24. Maybe check the wiring on it. Did you clear the codes after you swapped tb's?
For the code 31, make sure your gas cap is on correctly. If it is, then you may have to replace the solenoid and/or inspect all your hoses and connections.