Refactoring
 
- Seperate html and js
- Change initialization method
- Relocate some sources
- Render js files to get csrf code