Fixed handling of type declarations in output, and gave names to underscores in composite function parameters.