First pass at input handling.