Various libxeg improvements