Use <label>s where appropriate.
Use JSON.parse() instead of eval()
Moved delete buttons to forms, and added a confirmation.

Delete operations now require a POST operation and are no longer simple
links. Furthermore, they require an explicit confirmation by the user.
Improved SQL queries etc.
Simplificiations and restructuring