refact MiscUtils and NetworkUtils