minor cleanups accumulated while reading the code