PEPS and other fixes