TODO: Add generalized element_type in queue implementation and fix compilation errors