Added "XY" version of integral and made all versions work