Integrated usage of new output queue functions
Removed dead code