Database update + small bugfix
Edition interface. Code is a big mess but is seems to work.