Removed unused 'total' variable and replaced vanilla js statement with jquery statement in index.html