Refactor and better redirection of requests