allow nnls.c to work with multithreaded applications
use a different nnls implementation, fix our offset
fix if statement in nnls function, remove unused header
use memcpy, proper output, fix iteration bug
be consistent and use fprintf