[PD] data structures and library abstraction question