Adding reading/writing of struct data. (not working yet)