Added support for variable amount of function arguments

- Added build in functions avg (mean) and sum (total)
- Updated unit tests to check new avg and sum functions as well as function argument check