new function evaluator, added phase function, multiple arg support, bugfixes, code cleanup