Added initial structure for connected flag inside of peer, main still needs changes