Trying to modularize input handling.