Can't help with the noise/Z brake problem but I am slightly concerned about the "G28 X0 Y0 Z50" line. This means (or, at least, it would when used with Mach3) "goto the tool change position but go to X0 Y0 Z50 first". It's a kind-of "go via" command. The concern is that if the tool takes a straight line from where it is to X0 Y0 Z50 it might well hit something on the way. I use a "G28 Z0" command (with the "use machine coordinates" G code thing as well but I forget what that is without looking it up) so that the tool moves vertically upwards first to max height (my machine is configured to have Z0 at the top of travel); it then moves to whatever is defined as the G28 XY coordinates with the best chance of not wiping the tool out on the way!

Just a thought, as I know that G code interpretation does vary from machine controller to controller so your machine might be different.