rdo library extensively reworked in generator

more structuring
reducing new count
etc