Updates to Functions

More progress on functions, but still not there.