Refactored broadcast code, broadcast test [#2], [#10]