More refactoring for convert