https hardening and other tweaks