split broadcast to a separate file

There are syntax issues to put it in a class