Add sanity check for upgrades on <J3.2
Move functions back to XML file