Trying to save references to the functions and record the calls to the functions.

If only I knew ruby...