Made XS and PP errors more consistent and added tests