Socket goes into constructor now.

And some other stuff.
Merge branch 'feature/i21-constructor-accepts-socket' into develop