A little cleanup in misc.cpp