Fix spelling mistakes, and remove unused function.