Minor refactors