Perform beacon ranging on the main queue. General cleanup.