The easiest way I have seen is answering the following questions, or by saying that purchase Trumps all others and Home improv. Trumps refi.
#1. Are any funds for purchase - if yes it is a purchase loan.
If no #2. Are any funds for home improvement - if yes it is a home improvement loan.
If no then by process of elimination is is refi.
SO - my opinion is that your situation would be a home improvement loan.
My opinions are just that, and might be worth what you paid for them.