Refactoring of arp module