Automatically clear entries when record was inserted. Refactoring to use tuple comprehension