Sold a rental property in 2019 and had foundation and flooring repair expenses in 2018 and 2019. How should I report these?

I had a rental property that I bought in 2015 and sold in 2019. The property appreciated significantly in price over that time, however, in 2018 I began having an issue with the foundation which impacted the flooring. The unit was a townhouse and was tenant occupied at the time the issue began. I had over $10,000 in expenses related to fixing the foundation issue and having a contractor remove the original flooring that was destroyed and install new flooring of the same quality. I have all of the documentation related to these expenses and some others related to the foundation issue, such as reparing cracks in walls. I also had several hundred in expenses related to having my tenant's furniture moved into a storage unit while the work was completed. Should all of these expenses be deductible? If yes, how do I report these expenses now that I am reporting the sale as a gain? Thanks.