improve edit, refactor db
fixed simplecollection update failing