Rework the generic functions
This MR brings the generic function in line with the other multivariate functions and solves #203 (closed)
NOTE: There are also a few (not too pretty) changes to dios. They only (vastly) improve the type checking situation...