Fixed a number of hostname check bugs and formatting concerns.