various cleanups / fixes