Reworked UI. Created separate network thread. Fixed various bugs.