Moved all network functions to separate threads and upgraded to API 17