Various changes. See detailed message

 - Separate network module
 - Rewritten threading scheme of map renderer
 - Many minor code tweaks