Refactor: move paths into node attributes