Refactored internet stuff