rpl: cleanup, changing structdefs into typedefs