First queue implementation with tests