Revert "Revert "UserFunctions class""

This reverts commit 8dfaff25a9e3ac5be8727311fe8fde11bd551874.