Trim the code of minmax()