Several bug corrections and improvements. The update of the database now works in every single case (or at least it should ...)