compile: switch IP4 url to https and tidy up script.