Refactoring HttpUrlEncoder