Little refactors all over the place