Addded first draft of internal data structures.