Added some diagnostic printing to ta_sparse.
Fixed compile errors from the previous commit.
Minor code formatting change.