More minor refactors