Moved random broadcast code into sub function.
Adds .gitignore