Got rid of duplicate args and got rid of typos in functions defs.