Refactor
Fix generateHTML()
Implement edit