[TASK] Use generateUuid() for random identifiers
[TASK] Remove lastVisitedNodeScript