Start libifying the MAX code.