Saving work on structs

Work was done on features/er-restapi, but should be committed here