Move network operations

Network operations should not be done on the main thread