Move from Cursor based to Event based
1. Move from Cursor based to Event based.
2. Fix inserting issues for collection of primitives