Small fixes

Fix a typo and remove an unused function.