Revamp of path enumeration logic