Move AMX utilities to separate file