switch to use http_get instead of popen
fix for retrieving the port
added http_get in here
move dn. objects into own folder