Some convertions to AMX

Unfinished