Rewrite more functions in C and parallelize the computation of volumes and bbs.