Refactoring interrupting input test and code.