Input refactoring