Revert "Removed TerminalConnection"

This reverts commit 7c04312cae1580728a3796eb5f816d9589b9c1e1.