Improved error-reporting. Green: Returns path travelled.
Encapsulated functions; Green: Marks path and doesn't recross it.