minor tidy-ups. remove the rest of unused defs.