Added Min and Max function definitions. Incomplete at this point.