ptext: store the reduction start index in it's own variable
ptext: cleanup
ptext: compile fixes