Add builtin function type. Refactor eval.c a bit.