Still a big block of new text here, and the file contains multiple definitions of the functions.  It looks like a stray "paste" command happened somewhere...