Code refactorization for easier request input handling.