The old script had a lot of unused code in it, either stuff that couldn't be configured from OPNsense or dead code.