Finishing countmatrix scripts