Removed unused code and fixed a typo.