After making a backup copy of your post FIRST,
To fix the A0 output, look for:
164. Enable Rotary Axis button? y
Change the y to n
The G53 is probably coming from your MISC INT setup
It is ouput by the folowing section:
MISC INT #1 needs to be a value of 2 to output the G54 or higher work offset.
pwcs #G54+ coordinate setting at toolchange
if mi1 > one,
sav_frc_wcs = force_wcs
if sub_level, force_wcs = zero
if workofs <> prv_workofs | (force_wcs & toolchng),
if workofs < 6,
g_wcs = workofs + 54
p_wcs = workofs - five
force_wcs = sav_frc_wcs
You might also look for:
force_wcs : yes #Force WCS output at every toolchange?
The above code comes from an unmodified MPFAN post.