parse: Minor code cleanup and commenting
Fix Python generation of function defs

Fixes #12.