Renamed new-fn dfn and new-def ddef.

I also renamed some variables and cleaned up some redundent code.