Revert "Final round, code is now simpler"

This reverts commit 7e86ac393494df34eb77a96c3ea53dee0a9a1903.