Added computation of several statistics + fixed some more bugs, still doesn't work
Saved progress, stopping working on this problem for now