Defining data structures better