Finished implementing rerouting. Now debugging....