Implement connection cleanup