Awa: replace max function by std::max
Awa process with terry operations.