Pull in scripts based on protocol

Also uses https for a few a outbound links.