clean up main.c functions and add a new function to test indirect struct member assignment