More refactoring of convert org
Added more tests and code for convert org