adds host header argument. Changes defaults to localhost. Updates misc comments