Make sure get_node_path also works outside of the current path & clean up related code a little