OptimizedQueue almost finished