First functioning UI version with threading.