Fixing typos and removing dead code