Clean up gateway.