Refactoring of linking with the web service