Added MAX_INT function and definitions