cleanup + fix

@dgwakeman please take a look. This fixes all tests on my end across different pythons. Don't hesitate to ask me. I'm still trying to rebase btw.