Added simple input handling.