refactored implementation of built-in operators and functions to use delegates, greatly simplifying the code