Rewritten network part of app so multiple tasks could run parallel

Signed-off-by: Frca <killerfrca@gmail.com>