clean up code, structs, comments