Use @input/@output instead of STDIN/STDOUT directly.
Add a few more comments.