Refactored entry gate closing operation.