What causes the car to understeer and oversteer

What you describe is not over or under steer. Those are terms used for how a car "plows" in a corner.

Something is wrong, either the rebuild was not done correctly, something is loose, the steering u-joint is messed up, the steering box is out of whack, your alignment is a mess, tires are trashed, and possibly bad or improperly installed wheel bearings just to name a few. Find a competent shop and have it looked at ASAP because something is not right and potentially dangerous.