COM refactoring. Step 4.
Add closePort.