Implements #58
Completely untested, 37% random. May work by accident.
Implements #58 (n°2)
Fixes previous commit. Maybe.