Last of the fixes! Time to write tests :shipit: