Drastically modified the pathfinding algorithm to use a timer.
If changes are undesirable, just reset HEAD~1 from this commit to revert the changes.
This may not be exactly what we want.