Updated version of J's xengine.