Even more refactoring

This was supposed to be in the last one, but I'm dumb.