Work-in-progress entry/exit handling: export only so far (commented out)