Refactored output system into buffer queue