Major refactoring of filters/tests/functions/macros to prepare for named arguments