Even more refactoring … this turned out to be a lot of work :/