Got rid of foreign key in db-tables. Deletion of folders/files/versions implemented.