Imlement prepare, call scripts after writing configs, added VLAN offset support