def clean_route_list(route_stack: list, goal_node_id: int):
	"""
	Creates an ordered route list from start to finish
	with all node ids needed to traverse to the goal.

	:param route_stack:     All routes found until goal
	:param goal_node: int   ID of the goal node
	:return: list           A ordered list from start to goal
	"""
	r = []
	next_node = goal_node_id
	reversed_stack = reversed(route_stack)
	for c in reversed_stack:
		if c.to_node.id == next_node:
			r.append(c.to_node.id)
			r.append(c.from_node.id)
			next_node = c.from_node.id

	return list(set(r))