Sagging Floors and loose floorboards
The short answer is call in a structural engineer to get a grasp of the problem and the scope of work necessary to fix it. I have a similar situation with a 170 year old home. The 1st floor foundation work was done by a licensed foundation company from the area. The 2nd floor sagging issues are being tackled by a licensed general contractor with a background in structural engineering. We contacted 5-6 companies for estimates on the repairs and got 6 different solutions. It's hard to compare quotes when the scope of work is different from quote to quote and we are not qualified to know which is the right solution. With a structural engineer on board, the engineer sets the scope of work and the companies bid on doing it exactly the way the engineer's report states. It's the only way to be sure the structural solution is the correct solution and compare quotes fairly.