Changed target data storage to structs, and other miscellaneous changes