Revert "Something seems to have broken here. Do not use this commit. Investigating and fixing in next commit."

This reverts commit 41d010fb65c34e6abffaab1fc06be35523d391c4.