Refactor workers. Fix bugs in filestreaming and network streaming.