Some cleanup on the auto-accept code