User defined functions work.

Everything appears to be working. Need to start making test cases.