Draft API for dQ_dp.
Compilation fixes. I think the working draft of this is done
for the first pass. Now to test and debug.