fixed edit.html template and various bugs - basic form editing now works without errors