Write up input handling.