Added Maxima & Minima. Added logging.