Upgraded XChange library to 1.4.0
Adjusted code to match new API and dependencies