- fix for Bug1874: function definitions that are only used in kinetic laws receive the name 'function for XXXX' where XXX is the name of the reaction where they are being used
fix for #1879: initialize memory for residuals
Code simplification.