cleanup: remove unused code, fix warnings (2)