First draft of function mapper.
Fixing mapper's handling of self