Modifications to p5, still in progress