small refactor for modularity
port is a variable (finally)
reloading webview when something goes wrong