Minor code cleanups for new completion code