Moved some functions from Broker to HistoricalSitesQueue and updated
testing