Added database export and other bits