Nice tutorial and a great reference to look up the XML elements. :D

Anyway, I have a question.
Why do you use PS_OUTPUT and PS_INPUT?

The ps_main() example function could be done like this as...