Add code to find endpoint loops
Add code for hook correction
Improve visualization