Adapted Xtend code to the latest changes