Undo mistakes #309

This duplicates the undone commits.
#310 is now ready to merge.