Changed edge code to use the old code, fixed other code (reverse linked lists).