Improved hardening scripts