Deductions if rental property vacant

My rental house (previously rented) was vacant for a few months so I could make repairs, including replacing the rotting porch roof and beams, patching drywall, painting.  Can these expenses be deducted even though it was not available for rent while the work was done?

 

How do the vacancy months impact the other deductions like insurance payments, utilities, etc?

 

I also remodeled the bathroom and improved the landscaping during that time, but I assume those would be improvements added to the cost basis.  Is that correct?