refactoring portal-ews2-proxy module