Changed router to use NID flags and mac address. Removed math handler