Fix incorrect HTML
Add AJAX functionality