Reworks broadcast.js
Moves functional tests to funtest folder.