Implements #91

Test and merge.