cleaned up some data structures