modified generator to support order preference and use fully qualified type names