Max refactor step 1