FIXME: moved DefaultFunction to local scope

The FIXME in this file states the class is not in an appropriate spot
there, so I moved it to the only cpp file it is actually used in.
Decide where to put this when it's used anywhere else.