Added default parameter values.  Rewrote function parser in C.