Some more cleanups in input_common.c