added contacts tracking
fixed saving updated contacts
made update_contacts much faster
Did some housekeeping
added client ping/pong and timeouts