refactor function p for clarity
add comment on entry point
add rules to generate trace file
comment input routine
convert b to a const int
annotate parameters with const
revert b as global
add comment on state of machine after output
refactor ternary operator into if statement
show output in debug
add comments for case A and L
replace continuation with closure in comments
improve the description of L
add comment for case V
introduce function w for output, refactor case O