Fix tcp class error

- Completes PR: #193 

- lots of rubocop cleanup