First cut of function definitions and calls.

Also contains first draft of precedence hierarchy.