Extract Jabber proxy initialization into a separate method Extract Jabber password loading to a separate method Extract Jabber resource creation to a separate method Extract Jabber authentication retry to a separate method Add a combined A/AAAA lookup Connect to each found IP address before trying further lookups Create Jabber keepalive timer on demand