Constness and 2.0 double

This is just a minor change.

I'll have to go now into more serious melding, probably missing some stuff.
Note that I haven't compile/test this atomic commit!