New database structure dump and bug fixes