Cleaning before insert pattern