Moved debugging from Javascript console to index.html