Cherry pick of 6986ff2: Partial merge, ditched Mechanize.
Merge of 8a73d74:
Cherry pick of ff52821
Merge of 8a73d74:
Cherry pick of 64d33f1
Merge of 8a73d74:
Cherry pick of 0ae1b13
Merge of 8a73d74:
Cherry pick of 374531f
Cherry pick of 5b852b9: Partial merge, ditched Mechanize.
Cherry pick of 1f8cebc
Cherry pick of 9332dd9: Partial merge, ditched Mechanize.
Cherry pick of 9021e87
Revert partial of a548723 which I missed.
Cherry pick of 29c8a46: Partial merge, ditched Mechanize.
Merge of bd9d74b:
Cherry pick of c4de240
Cleaned up JSONChatConnection mess and while(true) loop from main