added tertiary statements
fixed up minor memory leak when evaluating functions
engine version 1.3.5