cleanup: Add and use macro MAX().