Re-reverting xgepy.cpp