Simplify insert code.