Broadcaster pages

Please check partitipant.js, maybe you have some suggestions on how to re-factor it.
How broadcaster is part of participant.js?
Shouldn't we refactor some functions to some "stream_client_lib.js"