improving templates for typedef object options