Recovery. Improved robustness.

* Now reporting number of bytes restored;
* Removed collisions of variable names with built-in variables (i.e. `sorted`, `next` and `range`);
* Factored out common code to dnet_recovery;
* Comments and spelling.