cleaning arp_handler and fixing some bugs