Move additional functionality out of input.cpp.