PAC and STAC Codes