Remove unused argument
Split up connect method into two

Reduce complexity as per codeclimate