These are legal contractual questions, so you should contact an attorney for legal advice.
Sounds like you didn't have an agent help you write this contract and that is may not have included an inspection contingency, which would have allowed you to cancel the contract due to inspection items.
Do you have an appraisal contingency? If the house didn't appraise for the agreed amount due to these issues, that may be another way to get out of the contract.
You should have an attorney review your contract and help you understand your obligations and the sellers obligations.