refactoring of common and contacttype dev