Changed node and stack to use typedef instead of tamplates