Refactored "QueueNode" to "QNode" for simplicity