various cleanups / remove unused code