+0

He wanted these agencies all to work together in one coordinated hall.

He wanted these agencies to all work together in one coordinated hall.


My conjecture is that all in the former is a noun and all in the latter is an adverb. Could you tell me what part of speech all is exactly?