Add flat queue implementation