Allow optional progressfunc in spa by checking for NULL.
More work on the API documentation. Created pdf from refman.tex.
Hopefully this is finished.