More formal data structures implementation