Replaced manager stacks by std queues, resolved plenty of #include bugs