Fix a typo in function names, and remove more dead code