Moved MAX to defines;