Added edit form and API endpoint