Input refactorization