Improved Queue class using private