I might be wrong, but I thought stuff like this is why you have title insurance?
As far as stuff done before you bought the place not being your problem, sorry it is, how would the problems ever be solved if it wasn't the owners responsibility? But I believe title insurance should cover the...