Moved js block to script tag in index to debug