General rework

- Add documentation for multiple path related functions
- Rename variables for same to improve readability
- Remove/Rewrite unneccessary or overcomplicated code