My guess without seeing the starting statement and the progress statements, that the remnant deductability is zero.
Every Salary and rent credit would have lowered the deductible amount, and every time you pulled cash for other than investment that would be a "new loan" for non ded...