Updates to ratchet and database