Refactor 8.12 - queuefromstacks.go