Added event flag updates and updated beaconing task