api_helpers: update comments and use del instead of pop on dictionary