Added JS variable to collect the app instance