Trying to start fixing the data structures and classes.