Fixed typos and removed unused code.