Inclusion of sympar.h moved to top of file for consistency with other templates.

states and outputs prepended with an underscore to prevent conflicts when
inputs and outputs have the same names.