Q libraries for data structures