Changes to allow local testing and auto IP lookup