Now check ip from hostname rather than querying dns api directly.  minor tweaks.