loading indicator webview and refactor