Halo exchange rule fix, adding new code generator