cleanup: mostly remove unused code