Loading animation added. JS for statistics page moved in separated script.