Fix the HalLinks -> fromLink function

- Refactoring
- Add more comments