More z_db cleanups