ugtrain: also move discovery post processing functions
options: use common types