Revert "BROKEN: Mid refactoring"

This reverts commit 15189690998237940a09dc823800c115384e88ef.