Use new data form
Remove useless code
Use new data form
Add a function for initialisation
Use only new data and javascript. Don't need to refresh the page