Refactored insertion