Add code for vlan for switch inventory and clean some functions