Start of a prototype by aggregate, switched from R to C-code version of df2scidb for speed