Added comments above functions mirroring what is done in stdduck.c