Get back and refactor upgrade feature

Get back the upgrade feature that's been deleted. Refactored upgrade decoder to "close" the class. Also enable xml to take multiple trees. ReflectionHelper used statically.