Reorganized insertAnalysis