In my (limited) experience with gas heaters, the sort of banging you describe results from inadequate flow through the heat exchanger. I don't know your heater model, much less your piping, but I'd recommend you verify adequate flow.