Moved the code in MainActivity, enabling the JS first and then setting
up the JS interface