More refactors