Refactor request controller