Input refactor