fix init order and only export fields from structs and methods from interfaces, that are exported