better amr + cleanup