Updated the algorithm for generating stubbable function definitions. Needs clean up though after this commit.
Added comments and cleaned up internal structures for parameterized stubs, resetting, and exposed functions.