Revert "Medic code repairs"

This reverts commit 25f1a4d421acc611741e70bd5fdb8aa047989031.
Revert "Revert "Medic code repairs""

This reverts commit 73b58945bd9e0f74680bc029cc2743572e789e55.