Code cleanup
Added broadcast detection to app [#2]