Merge code from XSoftBG
Upgrade to V3.1-SNAPSHOT