cleanup: Add and use macro MIN().