Yet another bunch of minor changes.

To do : recheck calculate function and check consistency overall (run
tests)