Working version that creates empty functions and adds a defaults variable.