Deductions & credits

No, you use the lower of the (1) Cost (usually purchase price plus cost of improvements) and (2) the Fair Market Value when it was converted to business use (in 2002).

Refinancing and the amount of mortgage have nothing to do with it.