Use tag types to separate the interfaces

Interface now has <Tag, InType, OutType> as parameters.