Use sqrt() instead of e(l()) as bc supports it
Be more robust and more informative whe computing the size of the dataset and something goes wrong
Fix dataset name
Some reorganization, some more comments, some more uniformity.