In the year you purchase of a new asset you can choose one of the following :
1) depreciate the cost of the equipment over the prescribed years in the CLADR tables
2) take a 179 deduction
3) 100% bonus depreciation
Interest paid on the loan, depreciation (if you depreciate the property ) repairs, are deductible in year paid. Correct
When the equipment is sold adjustment for prior depreciation are applied, When you sell an asset the adjusted basis is used to compute a gain or loss.