Redesigned Socket a bit. Separated the constructor from the connect function