Revert "Revert "Trying to fix the mess I've gotten myself into""

This reverts commit 5750669d2be650e695106e9a4c75b64f43f3e663.