Add some implementation comments. Fix bug that prevented some default arguments values from being generated.