Add async DNS resolution, rearrange modules to seperate functionalities