(maint) Fix typos and remove dead code