Added more descriptive comments to processStateQueues()