Input code cleanup, prepare for refactor job.