Replacing AMFoundation with AMError