Change from macros to functions and use named arguments
Hopefully fix documentation generation